Loading
Scriptbox
 VBScript Links 
 About VBscript 
 JavaScript Links 
 About JavaScript 
 Powershell Links 
 PSCRIPT the Script Launcher 
 PowerShell Shortcut Keys 
 About Powershell 
     VBScript
    JavaScript
    Powershell
Disclaimer
Contact
Latest 10 Scripts
Script search
  :: { Category } :: 0-9ABCDEFGHIJKLMNOPQRSTUVWXYZ
         

Search Options:  Add  All  the  Users  from  an  Existing  Active  Directory  Group  to  a  New  Group  

 Content of Add All the Users from an Existing Active Directory Group to a New Group.vbs
MD5 Hash: 416AEC7888FE6F47388377730BADAB98
Const ADS_GROUP_TYPE_GLOBAL_GROUP = &H2

Set objOU = GetObject("LDAP://OU=Finance, dc=fabrikam, dc=com")
Set objOldGroup = GetObject("LDAP://CN=Finance Managers, ou=Finance, dc=fabrikam, dc=com")

Set objNewGroup = objOU.Create("Group", "Finance Department")
objNewGroup.sAMAccountName = "financedept"
objNewGroup.groupType = ADS_GROUP_TYPE_GLOBAL_GROUP
objNewGroup.Set Info

For Each objUser in objOldGroup.Member
objNewGroup.Add "LDAP://" & objUser
Next



   © 2008 - 2013 Boris Toll      :: Scripts available: 6.481 ::      :: scriptbox.toll.at ::      :: powered by www.toll.at ::
  Google Entries:n/a
  Yahoo Backlinks:n/a
  Live Backlinks:n/a
  del.icio.us Bookmarks:n/a
  Technorati Links:n/a